package day20130913;

import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.Font;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JList;
import javax.swing.JPanel;
import javax.swing.JSplitPane;
import javax.swing.JTextField;
import javax.swing.SwingConstants;
import javax.swing.JComboBox;
import javax.swing.DefaultComboBoxModel;
import javax.swing.JScrollPane;
import javax.swing.JTable;

public class DeptSearchPanel extends JPanel {
	private JPanel panel;
	private JLabel lblNewLabel;
	private JPanel panel_1;
	private JLabel lblNewLabel_1;
	private JPanel panel_2;
	private JPanel panel_3;
	private JButton btnNewButton_2;
	private JButton btnNewButton_3;
	private JButton btnNewButton_4;
	private JComboBox comboBox;
	private JTextField textField_10;
	private JButton button;
	private JScrollPane scrollPane;
	private JTable table;

	/**
	 * Create the panel.
	 */
	public DeptSearchPanel() {
		setBackground(new Color(173, 216, 230));
		setLayout(new BorderLayout(0, 0));
		add(getPanel(), BorderLayout.NORTH);
		add(getPanel_1(), BorderLayout.WEST);
		add(getPanel_2(), BorderLayout.CENTER);

	}
	private JPanel getPanel() {
		if (panel == null) {
			panel = new JPanel();
			panel.setPreferredSize(new Dimension(10, 34));
			panel.setLayout(new BorderLayout(0, 0));
			panel.add(getLabel_1(), BorderLayout.WEST);
			panel.add(getPanel_3(), BorderLayout.CENTER);
		}
		return panel;
	}
	private JLabel getLabel_1() {
		if (lblNewLabel == null) {
			lblNewLabel = new JLabel(Messages.getString("EmpInsertPanel.lblNewLabel.text")); //$NON-NLS-1$
			lblNewLabel.setForeground(new Color(0, 0, 0));
			lblNewLabel.setHorizontalAlignment(SwingConstants.CENTER);
			lblNewLabel.setFont(new Font("돋움", Font.BOLD, 17));
			lblNewLabel.setPreferredSize(new Dimension(120, 15));
		}
		return lblNewLabel;
	}
	private JPanel getPanel_1() {
		if (panel_1 == null) {
			panel_1 = new JPanel();
			panel_1.setPreferredSize(new Dimension(120, 10));
			panel_1.setMinimumSize(new Dimension(30, 30));
			panel_1.setLayout(null);
			panel_1.add(getLabel_2());
		}
		return panel_1;
	}
	private JLabel getLabel_2() {
		if (lblNewLabel_1 == null) {
			lblNewLabel_1 = new JLabel(Messages.getString("EmpInsertPanel.lblNewLabel_1.text")); //$NON-NLS-1$
			lblNewLabel_1.setFont(new Font("굴림", Font.BOLD, 16));
			lblNewLabel_1.setBounds(50, 10, 58, 26);
		}
		return lblNewLabel_1;
	}
	private JPanel getPanel_2() {
		if (panel_2 == null) {
			panel_2 = new JPanel();
			panel_2.setLayout(null);
			panel_2.add(getComboBox());
			panel_2.add(getTextField_10());
			panel_2.add(getButton());
			panel_2.add(getScrollPane());
		}
		return panel_2;
	}
	private JPanel getPanel_3() {
		if (panel_3 == null) {
			panel_3 = new JPanel();
			panel_3.setLayout(new BorderLayout(0, 0));
			panel_3.add(getBtnNewButton_2(), BorderLayout.EAST);
			panel_3.add(getBtnNewButton_3(), BorderLayout.CENTER);
			panel_3.add(getBtnNewButton_4(), BorderLayout.WEST);
		}
		return panel_3;
	}
	private JButton getBtnNewButton_2() {
		if (btnNewButton_2 == null) {
			btnNewButton_2 = new JButton(Messages.getString("EmpInsertPanel.btnNewButton_2.text")); //$NON-NLS-1$
		}
		return btnNewButton_2;
	}
	private JButton getBtnNewButton_3() {
		if (btnNewButton_3 == null) {
			btnNewButton_3 = new JButton(Messages.getString("EmpInsertPanel.btnNewButton_3.text")); //$NON-NLS-1$
			btnNewButton_3.setMinimumSize(new Dimension(120, 23));
			btnNewButton_3.setMaximumSize(new Dimension(120, 23));
			btnNewButton_3.setPreferredSize(new Dimension(120, 23));
		}
		return btnNewButton_3;
	}
	private JButton getBtnNewButton_4() {
		if (btnNewButton_4 == null) {
			btnNewButton_4 = new JButton(Messages.getString("EmpInsertPanel.btnNewButton_4.text")); //$NON-NLS-1$
			btnNewButton_4.addActionListener(new ActionListener() {
				public void actionPerformed(ActionEvent arg0) {
					contentpane.removeAll();
					contentpane.add( new ( ));
					contentpane.validate();
					
					
				}
			});
			btnNewButton_4.setPreferredSize(new Dimension(160, 23));
			btnNewButton_4.setMinimumSize(new Dimension(120, 23));
			btnNewButton_4.setMaximumSize(new Dimension(120, 23));
		}
		return btnNewButton_4;
	}
	

	private JComboBox getComboBox() {
		if (comboBox == null) {
			comboBox = new JComboBox();
			comboBox.setModel(new DefaultComboBoxModel(new String[] {"ID", "Name"}));
			comboBox.setBounds(12, 10, 88, 27);
		}
		return comboBox;
	}
	private JTextField getTextField_10() {
		if (textField_10 == null) {
			textField_10 = new JTextField();
			textField_10.setColumns(10);
			textField_10.setBounds(112, 10, 273, 27);
		}
		return textField_10;
	}
	private JButton getButton() {
		if (button == null) {
			button = new JButton("Search");
			button.setBounds(397, 10, 105, 27);
		}
		return button;
	}
	private JScrollPane getScrollPane() {
		if (scrollPane == null) {
			scrollPane = new JScrollPane();
			scrollPane.setBounds(12, 47, 490, 372);
			scrollPane.setViewportView(getTable());
		}
		return scrollPane;
	}
	private JTable getTable() {
		if (table == null) {
			table = new JTable();
		}
		return table;
	}
}
